#ifndef ACCOUNT_HH
#define ACCOUNT_HH

#include <string>
#include <iostream>
#include "Transaction.hh"

#include <vector>

class Bank; // Forward declaration
class Account {
protected:
    std::string accountID;
    double balance;
    std::string owner;
    std::vector<Transaction> transactions;


public:
    Account(const std::string& id, double initialBalance, const std::string& owner);
    virtual ~Account() = default;
    

    const std::string& getAccountID() const;
    double getBalance() const;
    const std::string& getOwner() const;
    const std::vector<Transaction>& getTransactions() const;

    virtual void deposit(double amount, const std::string& note = "");
    virtual void withdraw(double amount, const std::string& note = "");
    virtual void transfer(Account* to, double amount, const std::string& note = "");
    virtual void setBank(Bank* bank) = 0; // Pure virtual function

    void recordTransaction(const Transaction& transaction);
    virtual void accessAccount();
};
#endif // ACCOUNT_HH